package org.javaboy.vhr.mapper;

import org.javaboy.vhr.model.Department;

import java.util.List;

public interface DepartmentMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Department record);

    int insertSelective(Department record);

    Department selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Department record);

    int updateByPrimaryKey(Department record);

    List<Department> getAllDepartmentsByParentId(Integer pid);

    void addDep(Department dep);

    void deleteDepById(Department dep);

    List<Department> getAllDepartmentsWithOutChildren();

    boolean checkIsParentById(Integer id);

    Integer getParentId(Integer id);

    Integer checkSon(Integer parentId);

    void updateIsnParent(Integer parentId);

    boolean delDep(Integer id);

    Integer getId(String name);

    String getParentPath(Integer parentId);

    void updateIsParent(Integer parentId);

    boolean updatePath(String depPath, Integer id);

    Department getNewDep(String name);
}
